Skip to content

feature: add LocalPath to support use local resource to skip download #3777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ningmingxiao
Copy link
Contributor

@ningmingxiao ningmingxiao commented Jul 30, 2025

some airgap environment doesn't support to download image. we can use local image when localPath is set.
for example if localPath is set we can skip to download from https://cloud-images.ubuntu.com/releases/oracular/release-20250701/ubuntu-24.10-server-cloudimg-amd64.img

images:
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.

- location: "https://cloud-images.ubuntu.com/releases/oracular/release-20250701/ubuntu-24.10-server-cloudimg-amd64.img"
  arch: "x86_64"
  digest: "sha256:69f31d3208895e5f646e345fbc95190e5e311ecd1359a4d6ee2c0b6483ceca03"
  localPath: "/tmp/ubuntu-24.10-server-cloudimg-amd64.img"

@jandubois
Copy link
Member

jandubois commented Jul 31, 2025

Is this necessary? I would have expected this to already work:

images:

# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
- location: "https://cloud-images.ubuntu.com/releases/oracular/release-20250701/ubuntu-24.10-server-cloudimg-amd64.img"
  arch: "x86_64"
  digest: "sha256:69f31d3208895e5f646e345fbc95190e5e311ecd1359a4d6ee2c0b6483ceca03"

- location: "/tmp/ubuntu-24.10-server-cloudimg-amd64.img"
  arch: "x86_64"

Of if that doesn't work, try file:///tmp/...

Reorder the entries if you want to always prefer the local file, if it exists.

@ningmingxiao
Copy link
Contributor Author

ningmingxiao commented Jul 31, 2025

thanks, it works well. @jandubois

- location: "/tmp/ubuntu-24.10-server-cloudimg-amd64.img"
  arch: "x86_64"

I think we can add some doc to explain how to use location in airgap environment.

@jandubois
Copy link
Member

thanks, it works well. @jandubois

Thanks for confirming! I will close this PR then because it is not needed.

I think we can add some doc to explain how to use location in airgap environment.

The "documentation" (in default.yaml) already states that location is a URL, so not sure what else to add. But feel free to create a docs PR if you think it needs further elaboration.

@jandubois jandubois closed this Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants